sumlist (x:xs) = x + sumlist xs
sumlist    []  = 0

main :: IO()
main = do 
  print $ sumlist [n | n <- [1..999], (mod n 3 ==0) || (mod n 5 == 0)]

